<template>
  <div class="wrapper-bread">
    <el-breadcrumb
      style="margin:24px 0 24px 0;position:relative;z-index:10000;font-size:16px;"
      separator-class="el-icon-minus"
    >
      <el-breadcrumb-item
        v-for="(item, index) of objectKeys(breadCrumbObj)"
        :to="{ path: breadCrumbObj[item] }"
        :key="index"
        >{{ item }}</el-breadcrumb-item
      >
    </el-breadcrumb>
  </div>
</template>
<script>
export default {
  data() {
    return {
      breadCrumbObj: { 首页: '/main' },
      objectKeys: Object.keys
    }
  },
  watch: {
    '$store.state.pathObj': {
      handler(newV, oldV) {
        this.breadCrumbObj = newV
      },
      deep: true,
      immediate: true
    }
  }
}
</script>
<style lang="scss" scoped>
/*.wrapper-bread {*/
/*  width: 78vw;*/
/*  margin: 0 auto;*/
/*}*/
</style>
